<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>配件单管理</title>
    <link href="{:C('WEB_URL')}Public/admin/style/base.css" rel="stylesheet" type="text/css" />
    <link href="{:C('WEB_URL')}Public/admin/style/master.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/jquery1.9.1.js"></script>
    <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/base.js"></script>
</head>

<body>

    <div id="wrapper">
        <h2>订单管理</h2>
        <table class="list">
            <thead>
                <tr>
					<th>订单号</th><th>订单ID</th><th>订单名称</th><th>车主姓名</th><th>联系方式</th><th>车型</th>
					<th>订单金额</th><th>支付类型</th>

					<th>下单时间</th><th>订单状态</th><th>操作</th>

                </tr>
            </thead>

            <tbody>

            <volist name='list' id='vo'>

                <tr align="center" id="J_list{$vo.brand_id}">
                   <?php $sex = array("1"=>"先生","2"=>"女士"); ?>
                    <td>{$vo.order_num}&nbsp;</td>
                    <td>{$vo.order_id}</td>
                    <td>{$vo.order_name}&nbsp;</td>
                    <td>{$vo.realname}&nbsp;<?php echo $sex[$vo['sex']]; ?></td>
					<td>{$vo.username}&nbsp;</td>
					<td>{$vo.brand_name}-{$vo.model_name}-{$vo.model_pl}-{$vo.model_year}&nbsp;</td>
                    <td>￥{$vo.all_price}&nbsp;元</td>
					<td><?php if($vo['pay_type']==1){echo '支付宝支付';}elseif($vo['pay_type']==2){echo '微信支付';}elseif($vo['pay_type']==3){echo 'POS支付';}else{echo '未支付';} ?></td>

					<td><?php echo date('Y-m-d H:i:s',$vo['create_time']); ?>&nbsp;</td>

					<td><?php if($vo['status']<60 && $vo['status']>5){echo '正在保养';}elseif($vo['status']==60){echo '保养完成';}else{echo '未保养';} ?></td>

                    <td>
                    	<a href="javascript:void(0)" onclick="setPrice('{$vo['order_id']}')">设为1元</a>
                        <!--<a href="{:U('edit',array('id'=>$vo['brand_id']))}" class="edit" >编辑</a>-->
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>

        <p class="hr_10"></p>

        <div class="pages">{$page} </div>

    </div>
</body>
<script>
	function setPrice(id){
		$.ajax({
			url:"{:U('editSummerOrder')}",
			type:"post",
			dataType:"json",
			data:{"id":id},
			success:function(res){
				if(res.status==1){
					alert(res.info);
					window.history.go(0);
				}else{
					alert("设置失败，请重试！");
				}
			}
		})
	}

</script>

</html>